package com.ruoyi.recycle.dto;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 综合站管理对象 merchant_management
 *
 * @author Wubk
 * @date 2022-05-21
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class MerchantManagementDTO {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 综合站名称
     */
    @Excel(name = "综合站名称")
    private String shopName;

    /**
     * 站长姓名
     */
    @Excel(name = "站长姓名")
    private String merchantName;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    private String phone;

    /**
     * 积分
     */
    @Excel(name = "积分")
    private Long integral;

    /**
     * 类型
     */
    @Excel(name = "类型")
    private String type;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registerTime;

    /**
     * 账号
     */
    private String merchantNumber;

    /**
     * 密码
     */
    private String merchantPassword;

    /** 证件资料-营业执照 */
    @ApiModelProperty(name = "merchantBusinessLicense",value = "证件资料-营业执照",dataType = "String")
    private String merchantBusinessLicense;

    /** 证件资料-身份证正面 */
    @ApiModelProperty(name = "merchantIdentityCardFront",value = "证件资料-身份证正面",dataType = "String")
    private String merchantIdentityCardFront;

    /** 证件资料-身份证反面 */
    @ApiModelProperty(name = "merchantIdentityCardReverse",value = "证件资料-身份证反面",dataType = "String")
    private String merchantIdentityCardReverse;

    /**
     * 证件资料
     */
    private String merchantImg;

    /**
     * 状态
     */
    private String status;

    /**
     * 小程序码
     */
    private String miniProgramCode;

    /**
     * 微信标识
     */
    private String openid;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchTimeBegin;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date searchTimeEnd;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updatedTime;

    private Integer currentPage = 1;

    private Integer pageSize = 10;

    public void setSearchTimeEnd(Date searchEnd) {
        this.searchTimeEnd = DateUtil.offsetSecond(searchEnd, 86399).toJdkDate();

    }
}
